package com.common.retrofit.methods;

import com.common.retrofit.base.BaseMethods;
import com.common.retrofit.entity.bean.RewardsDatasBean;
import com.common.retrofit.service.HaiNingService;

import rx.Observable;
import rx.Subscriber;

public class GetRewardDatasMethods extends BaseMethods {

    private static GetRewardDatasMethods m_ins = null;

    public static GetRewardDatasMethods getInstance() {
        if (m_ins == null) {
            synchronized (GetRewardDatasMethods.class) {
                if (m_ins == null) {
                    m_ins = new GetRewardDatasMethods();
                }
            }
        }
        return m_ins;
    }

    @Override
    protected String getHttpUrl() {
        return "Personal/";
    }

    private HaiNingService initService() {
        return getRetrofit().create(HaiNingService.class);
    }


    public void get_invation(Subscriber<RewardsDatasBean> subscriber,
                      int  uid,
                      String hashid,String times ,int type,int page ) {
        Observable observable = initService().get_invation(System.currentTimeMillis()+"",
                "71252d009e83e7bea92a9b280dc7acdc",uid,hashid,times,type,page
        );
        toSubscribe(observable, subscriber);
    }
}
